# -*- coding: utf-8 -*-
"""
------------------------------------------------------------------------------
    File Name:  endecode
    Author   :  wanwei1029
    Date     :  2018/9/14
    Desc     :
------------------------------------------------------------------------------
"""
import sys
import re

sys.path.append("..")
import samp_logging as sl

logger = sl.get_logger('endecode')


def samp():
    """
    """
    print(sys.getdefaultencoding())
    str = "QQ\\u5feb\\u901f\\u767b\\u5f55\\u534f\\u8bae\\u5206\\u6790\\u4ee5\\u53ca\\u98ce\\u9669\\u53cd\\u601d"
    print(str.encode('utf-8').decode('unicode_escape'))
    print(eval("u"+"\'"+str+"\'").encode('utf-8'))

if __name__ == '__main__':
    test_method = "samp"
    if test_method == "samp":
        samp()